Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed atexit.register(_umount) to skip umount after each storage ac… #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

removed atexit.register(_umount) to skip umount after each storage ac… #52

wants to merge 1 commit into from

Conversation

mmayuri
Copy link

@mmayuri mmayuri commented Mar 23, 2021

…tions

fixes : umount is not required for all exists ex. _mount mounpoint will be unmounted before
performing any file operation or storage update

Signed-off-by: Mayuri Mohite [email protected]

…tions

fixes : umount is not required for all exists ex. _mount mounpoint will be unmounted before
performing any file operation or storage update

Signed-off-by: Mayuri Mohite <[email protected]>
@@ -20,7 +20,6 @@ def __init__(self, mtda):
self.isfuse = False
self.isloop = False
self.lock = threading.Lock()
atexit.register(self._umount)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add a condition for atexit.register() to be called when MTDA is running in daemon/server mode.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

daemon is always running on assist board and while accessing assist board from remote host we start daemon verified with ps -ax | grep mtda-cli > mtda-cli -d -n please provide provide a pointer to handle atexit.register
can we call atexit.register when needed to umount.
Please review need your guidance to handle it correctly

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could do something like:

if mtda.is_server is True:
    atexit.register(self._umount)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants